<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Return first attribute</title>
 </head>
 <body class="docs"><div id="layout">
  <div id="layout-content"><div id="function.ldap-first-attribute" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ldap_first_attribute</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">ldap_first_attribute</span> &mdash; <span class="dc-title">Return first attribute</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.ldap-first-attribute-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>ldap_first_attribute</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$link_identifier</code></span>
   , <span class="methodparam"><span class="type">resource</span> <code class="parameter">$result_entry_identifier</code></span>
   ) : <span class="type">string</span></div>

  <p class="para rdfs-comment">
   Gets the first attribute in the given entry. Remaining attributes are
   retrieved by calling <span class="function"><a href="ldap_next_attribute.html" class="function">ldap_next_attribute()</a></span> successively.
  </p>
  <p class="para">
   Similar to reading entries, attributes are also read one by one from a
   particular entry.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.ldap-first-attribute-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<code class="parameter">link_identifier</code></dt>

     <dd>

      <p class="para">
       An LDAP link identifier, returned by <span class="function"><a href="ldap_connect.html" class="function">ldap_connect()</a></span>.
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">result_entry_identifier</code></dt>

     <dd>

      <p class="para">
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">ber_identifier</code></dt>

     <dd>

      <p class="para">
       <code class="parameter">ber_identifier</code> is the identifier to internal
       memory location pointer. It is passed by reference. The same
       <code class="parameter">ber_identifier</code> is passed to
       <span class="function"><a href="ldap_next_attribute.html" class="function">ldap_next_attribute()</a></span> , which modifies that
       pointer.
      </p>
      <blockquote class="note"><p><strong class="note">Note</strong>: 
       <p class="para">
        This parameter is no longer used as this is now handled automatically
        by PHP. For backwards compatibility PHP will not throw an error if
        this parameter is passed.
       </p>
      </p></blockquote>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.ldap-first-attribute-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns the first attribute in the entry on success and <strong><code>FALSE</code></strong> on
   error.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.ldap-first-attribute-changelog">
  <h3 class="title">更新日志</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>版本</th>
       <th>说明</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>5.2.4</td>
       <td>
        The <code class="parameter">ber_identifier</code> was removed. This
        is now handled automatically by PHP.
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.ldap-first-attribute-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="ldap_next_attribute.html" class="function" rel="rdfs-seeAlso">ldap_next_attribute()</a> - Get the next attribute in result</span></li>
    <li class="member"><span class="function"><a href="ldap_get_attributes.html" class="function" rel="rdfs-seeAlso">ldap_get_attributes()</a> - Get attributes from a search result entry</span></li>
   </ul>
  </p>
 </div>


</div></div></div></body></html>